package com.mhkj.base.templete.entity;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.Transient;

import com.mhkj.base.busiType.entity.BusinessType;
import com.mics.core.common.validate.annotation.NotNull;
import com.mics.core.common.validate.annotation.Number;
import com.mics.core.common.validate.annotation.Validate;
import com.mics.core.system.base.entity.BaseDomain;
import com.mics.core.system.rbac.entity.Dictionary;

/**
 * 模板数据
 * @author mics
 * @date 2018年7月20日
 * @version 1.0
 */
@Entity
@Table(name="t_plan_templete_data")
@Validate
public class PlanTempleteData extends BaseDomain{
	/**
	 * 序列号
	 */
	private static final long serialVersionUID = -6617380515429758675L;
	
	/**
	 * 序号
	 */
	@NotNull(message="序号不能为空")
	@Column(name="NO",length=48,nullable=false)
	private String NO;
	
	/**
	 * 关联模板
	 */
	@JoinColumn(name="plan_templete_id")
	@ManyToOne(fetch=FetchType.LAZY)
	private PlanTemplete planTemplete;
	
	/**
	 * 节点名称
	 */
	@NotNull(message="节点名称不能为空")
	@Column(name="node_name",length=48,nullable=false)
	private String nodeName;
	
	/**
	 * 业务模块
	 */
	@JoinColumn(name="busi_type_id")
	@ManyToOne(fetch=FetchType.LAZY)
	private BusinessType businessType;
	
	/**
	 * 节点性质
	 */
	@JoinColumn(name="node_property_id")
	@ManyToOne(fetch=FetchType.LAZY)
	private Dictionary nodeProperty;
	
	/**
	 * 完成标准
	 */
	@Column(name="complete_standard",length=128)
	private String completeStandard;

	/**
	 * 工期
	 */
	@Number(message="工期应该是数字")
	@Column(name="deadline",length=128)
	private int deadline=1;
	
	/**
	 * 工期说明
	 */
	@Column(name="deadline_desc",length=128)
	private String deadlineDesc;
	
	/**
	 * 公司名称
	 */
	@NotNull(message="公司不能为空")
	@Column(name="company_name",length=64)
	private String companyId;
	@Transient
	private String companyName;
	/**
	 * 部门
	 */
	@NotNull(message="部门不能为空")
	@Column(name="office_name",length=64)
	private String officeId;
	@Transient
	private String officeName;
	/**
	 * 岗位名称
	 */
	@NotNull(message="岗位不能为空")
	@Column(name="post_name",length=64)
	private String postId;
	@Transient
	private String postName;
	/**
	 * 监督岗位
	 */
	@Column(name="supervise",length=64)
	private String supervise;
	/**
	 * 备注
	 */
	@Column(name="remark",length=240)
	private String remark;
	
	
	public String getRemark() {
		return remark;
	}
	public void setRemark(String remark) {
		this.remark = remark;
	}
	public PlanTemplete getPlanTemplete() {
		return planTemplete;
	}
	public void setPlanTemplete(PlanTemplete planTemplete) {
		this.planTemplete = planTemplete;
	}
	public String getNodeName() {
		return nodeName;
	}
	public void setNodeName(String nodeName) {
		this.nodeName = nodeName;
	}
	public String getCompleteStandard() {
		return completeStandard;
	}
	public void setCompleteStandard(String completeStandard) {
		this.completeStandard = completeStandard;
	}
	public int getDeadline() {
		return deadline;
	}
	public void setDeadline(int deadline) {
		this.deadline = deadline;
	}
	public String getNO() {
		return NO;
	}
	public void setNO(String nO) {
		NO = nO;
	}
	public BusinessType getBusinessType() {
		return businessType;
	}
	public void setBusinessType(BusinessType businessType) {
		this.businessType = businessType;
	}
	public Dictionary getNodeProperty() {
		return nodeProperty;
	}
	public void setNodeProperty(Dictionary nodeProperty) {
		this.nodeProperty = nodeProperty;
	}
	public String getDeadlineDesc() {
		return deadlineDesc;
	}
	public void setDeadlineDesc(String deadlineDesc) {
		this.deadlineDesc = deadlineDesc;
	}
	public String getSupervise() {
		return supervise;
	}
	public void setSupervise(String supervise) {
		this.supervise = supervise;
	}
	public String getCompanyId() {
		return companyId;
	}
	public void setCompanyId(String companyId) {
		this.companyId = companyId;
	}
	public String getOfficeId() {
		return officeId;
	}
	public void setOfficeId(String officeId) {
		this.officeId = officeId;
	}
	public String getPostId() {
		return postId;
	}
	public void setPostId(String postId) {
		this.postId = postId;
	}
	public String getCompanyName() {
		return companyName;
	}
	public void setCompanyName(String companyName) {
		this.companyName = companyName;
	}
	public String getOfficeName() {
		return officeName;
	}
	public void setOfficeName(String officeName) {
		this.officeName = officeName;
	}
	public String getPostName() {
		return postName;
	}
	public void setPostName(String postName) {
		this.postName = postName;
	}
	
	
	
	
	
	
}
